{template 'common/header'}
<ul class="nav nav-tabs">
	<li><a href="{php echo url('site/nav/shortcut', array('m' => $m));}">快捷菜单</a></li>
	<li class="active"><a href="{php echo url('site/shortcut');}">快捷导航风格</a></li>
	<li><a href="{php echo url('site/nav/shortcut', array('foo'=>'post'));}"><i class="icon-plus"></i> 添加条目</a></li>
</ul>
<form class="form-horizontal form" action="" method="post" enctype="multipart/form-data">
<div class="main">
	<div class="alert alert-info">
		设置微站底部的快捷菜单显示的模板与风格，并可以定制快捷菜单在模块中是否显示。
	</div>
	<h5 class="page-header">快捷菜单风格模板</h5>
	<div class="form-group">
		<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">选择模板</label>
		<div class="col-sm-10">
			<select class="form-control" name="template" onchange="preview($(this).val());">
				{loop $template $path}
				<option value="{$path}" {if !empty($setting['quickmenu']['enablemodule']) && is_array($setting['quickmenu']['enablemodule']) && ($setting['quickmenu']['template'] == $path)} selected{/if}>{$path}</option>
				{/loop}
			</select>
			<div class="help-block">选择微站底部快捷菜单的风格模板，选择后可通过下方的模板预览进得查看。</div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">启用显示模块</label>
		<div class="col-sm-10">
			{loop $modules $item}
			{if !in_array($item['name'], $ignore)}
			<label class="checkbox-inline">
				<input type="checkbox" name="module[]" value="{$item['name']}" {if !empty($setting['quickmenu']['enablemodule']) && is_array($setting['quickmenu']['enablemodule']) && in_array($item['name'], (array)$setting['quickmenu']['enablemodule'])} checked{/if} /> {$item['title']}
			</label>
			{/if}
			{/loop}
			<div class="help-block">微站底部快捷菜单只在勾选上的模块中显示，未勾选则不显示快捷菜单。</div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
		<div class="col-sm-10">
			<input name="token" type="hidden" value="{$_W['token']}" />
			<input type="submit" class="btn btn-primary" name="submit" value="提交" />
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">模板预览</label>
		<div class="col-sm-10">
			<iframe width="320" height="480" scrolling="yes" frameborder="0" src="../app/{php echo murl('utility/preview/shortcut', array('file' => !empty($setting['quickmenu']['template']) ? $setting['quickmenu']['template'] : 'default'))}" id="preview"></iframe>
		</div>
	</div>
</div>
</form>
<script type="text/javascript">
	function preview(name) {
		var url = "../app/{php echo murl('utility/preview/shortcut')}file=" + name;
		$('#preview').attr('src', url);
	}
</script>
{template 'common/footer'}